Skip to content

Fix installer Node runtime mismatch#68

Merged
steipete merged 2 commits intoopenclaw:mainfrom
rolandkakonyi:codex/fix-21126-installer-node-path
Mar 7, 2026
Merged

Fix installer Node runtime mismatch#68
steipete merged 2 commits intoopenclaw:mainfrom
rolandkakonyi:codex/fix-21126-installer-node-path

Conversation

@rolandkakonyi
Copy link
Contributor

@rolandkakonyi rolandkakonyi commented Feb 19, 2026

Summary

  • Problem: install.sh can leave openclaw bound to an older node (for example nvm Node 20), even after installing Node 22.
  • Why it matters: users finish install successfully but openclaw immediately fails with openclaw requires Node >=22.12.0.
  • What changed:
    • Added Node runtime selection logic to prefer/activate a supported Node (>=22) for installer operations.
    • Added a compatibility shim step for npm installs that writes an openclaw launcher using the selected Node 22 runtime when original shell PATH still points to unsupported Node.
    • Added a hard guard in install flow to fail early if Node 22 cannot be activated.
  • What did NOT change: no changes to package contents in openclaw itself; this PR only updates installer behavior in openclaw.ai.

Linked Issue/PR

Verification

  • Reproduced failure in Docker (ubuntu:24.04) with nvm Node 20 active before running installer.
  • Re-ran same repro against patched local install.sh:
    • installer now reports Using Node.js runtime at /usr/bin/node
    • shim created in original node bin dir
    • openclaw --version succeeds
    • openclaw config set gateway.mode local succeeds
  • Ran shellcheck -s bash public/install.sh after changes (clean).

Risk / Rollback

  • Risk: wrapper shim placement could surprise users with custom PATH setups.
  • Mitigation: shim is only created when original PATH does not provide supported Node; otherwise no shim is written.
  • Rollback: revert this PR to restore previous installer behavior.

AI-Assisted Contribution

  • Agent/tool: GPT-5.3-Codex (High reasoning)
  • Intent summary:
    • Reproduce issue #21126 with Docker + nvm Node 20 environment.
    • Implement installer-side fix ensuring Node >=22 is used for install and for post-install openclaw invocation.
    • Validate with before/after repro runs and shellcheck.
  • Human verification:
    • Reviewed code diff and runtime behavior.
    • Confirmed successful commands and logs after patch.

Companion Test PR

@vercel
Copy link

vercel bot commented Feb 19, 2026

@rolandkakonyi is attempting to deploy a commit to the Jamie's projects Team on Vercel.

A member of the Team first needs to authorize it.

rolandkakonyi and others added 2 commits March 7, 2026 19:40
Ensure install.sh uses Node >=22 for npm install steps even when
nvm Node 20 is first on PATH. Add a compatibility shim so the
installed openclaw command still runs via a supported Node runtime
in mixed-version shells.

Also fixes shellcheck warning in shim log output.
@steipete steipete force-pushed the codex/fix-21126-installer-node-path branch from 73b764f to f588421 Compare March 7, 2026 19:41
@steipete steipete merged commit 8cee7c3 into openclaw:main Mar 7, 2026
0 of 2 checks passed
@steipete
Copy link
Contributor

steipete commented Mar 7, 2026

Landed via temp rebase onto main.

  • Gate: bun install && bun run build && bash scripts/test-install-sh-unit.sh && shellcheck public/install.sh
  • Land commit: f588421
  • Merge commit: 8cee7c3

Thanks @rolandkakonyi!

@rolandkakonyi rolandkakonyi deleted the codex/fix-21126-installer-node-path branch March 7, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants